/*
*
* FILENAME:		linear_seq.h
* CREATED AT:		2012/May/5
* DECRITION:		delarantion of linear sequnence and data structure
* 
* MODULE:		any
* PLATFORM:		ubuntu-12.04/gcc-4.6.3
* AUTHOR:		incarnation-lee
* 
* ----------------------REVISION HISTROY------------------------
* No.	Date	Revised by	Function	Descrition
* 1	12/5/7	incar-lee			created
*
*/

#ifndef LINEAR_SEQ_H
#define LINEAR_SEQ_H

#include "udgtd.h"

#define LINEAR_SEQ_SIZE 100


STATUS linear_seq_demo(void) __attribute__((pure));

/* operation functions on data element */
STATUS init_lseq(S_sqlinear*);			/* initilize the linear seq list */
STATUS destory_lseq(S_sqlinear*);		/* destroy the linear */
STATUS clear_lseq(S_sqlinear*);			/* clear all the element of linear list */
STATUS isEmpty_lseq(S_sqlinear*);		/* linear list is empty */
size_t len_lseq(S_sqlinear*);			/* the number of linear list */
STATUS add_lseq(S_sqlinear*,S_element*);		/* add a new element append the linear list */
S_element* get_lseq(S_sqlinear*,int);		/* get the element of index in linear list */
S_element* next_lseq(S_sqlinear*,int);		/* the next element */
S_element* prior_lseq(S_sqlinear*,int);		/* the prior element*/
STATUS insert_lseq(S_sqlinear*,S_element*,int);	/* insert a data element */
STATUS delete_lseq(S_sqlinear*,int);		/* delete a data element */

#endif
